﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SRP_LibBusinessRules;
using SRP_LibBusinessEntity;
using System.Data;

namespace SRPCENTRIA.ws_appPrivada
{
    public partial class wListaFecCaducidad : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                CargarDatos();
            }
        }

        protected void btnBuscar_Click(object sender, EventArgs e)
        {
            CargarDatos();
        }
        private void CargarDatos()
        {
             
                 DataTable dt = new DataTable();
                NParametria parametria = new NParametria();
                dt = parametria.ListarVenCertif(txtBuscar.Text.Trim());
                GrvCertificado.DataSource = dt;
                GrvCertificado.DataBind();
             
        }

        protected void GrvCertificado_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            GrvCertificado.PageIndex = e.NewPageIndex;
            CargarDatos();
        }
    }
}